Systems and methods for dynamic optimization of flash cache in storage devices

ABSTRACT

In various embodiments, a storage device includes a magnetic media, a cache memory, and a drive controller. In embodiments, the drive controller is configured to establish a portion of the cache memory as an archival zone having a cache policy to maximize write hits. The drive controller is further configured to pre-erase the archival zone, direct writes from a host to the archival zone, and flush writes from the archival zone to the magnetic media. In embodiments, the drive controller is configured to establish a portion of the cache memory as a retrieval zone having a cache policy to maximize read hits. The drive controller is further configured to pre-fetch data from the magnetic media to the retrieval zone, transfer data from the retrieval zone to a host upon request by the host, and transfer read ahead data to the retrieval zone to replace data transferred to the host.

FIELD OF THE DISCLOSURE

This disclosure relates generally to information handling systems, andmore particularly to systems and methods for dynamic optimization offlash cache in storage devices.

BACKGROUND

As the value and use of information continues to increase, individualsand businesses seek additional ways to process and store information.One option is an information handling system. An information handlingsystem generally processes, compiles, stores, and/or communicatesinformation or data for business, personal, or other purposes. Becausetechnology and information handling needs and requirements can varybetween different applications, information handling systems can alsovary regarding what information is handled, how the information ishandled, how much information is processed, stored, or communicated, andhow quickly and efficiently the information can be processed, stored, orcommunicated. The variations in information handling systems allow forinformation handling systems to be general or configured for a specificuser or specific use such as financial transaction processing, airlinereservations, enterprise data storage, or global communications. Inaddition, information handling systems can include a variety of hardwareand software components that can be configured to process, store, andcommunicate information and can include one or more computer systems,data storage systems, and networking systems.

BRIEF DESCRIPTION OF THE DRAWINGS

It will be appreciated that for simplicity and clarity of illustration,elements illustrated in the Figures have not necessarily been drawn toscale. For example, the dimensions of some of the elements areexaggerated relative to other elements. Embodiments incorporatingteachings of the present disclosure are shown and described with respectto the drawings presented herein, in which:

FIG. 1 illustrates a block diagram of an information handling systemaccording to one aspect of the disclosure;

FIGS. 2 through 4 are block diagrams illustrating the information flowbetween an information handling system and a storage device;

FIG. 5 is a flow diagram illustrating a method for initializing astorage device;

FIG. 6 is a flow diagram illustrating a method for using a cache of astorage device during backup; and

FIG. 7 is a flow diagram illustrating a method of using a cache of astorage device during retrieval.

The use of the same reference symbols in different drawings indicatessimilar or identical items.

DETAILED DESCRIPTION OF DRAWINGS

The following description in combination with the Figures is provided toassist in understanding the teachings disclosed herein. The followingdiscussion will focus on specific implementations and embodiments of theteachings. This focus is provided to assist in describing the teachingsand should not be interpreted as a limitation on the scope orapplicability of the teachings. However, other teachings can certainlybe utilized in this application. The teachings can also be utilized inother applications and with several different types of architecturessuch as distributed computing architectures, client/serverarchitectures, or middleware server architectures and associatedcomponents.

For purposes of this disclosure, an information handling system caninclude any instrumentality or aggregate of instrumentalities operableto compute, classify, process, transmit, receive, retrieve, originate,switch, store, display, manifest, detect, record, reproduce, handle, orutilize any form of information, intelligence, or data for business,scientific, control, entertainment, or other purposes. For example, aninformation handling system can be a personal computer, a PDA, aconsumer electronic device, a network server or storage device, a switchrouter, wireless router, or other network communication device, or anyother suitable device and can vary in size, shape, performance,functionality, and price. The information handling system can includememory, one or more processing resources such as a central processingunit (CPU) or hardware or software control logic. Additional componentsof the information handling system can include one or more storagedevices, one or more communications ports for communicating withexternal devices as well as various input and output (I/O) devices, suchas a keyboard, a mouse, and a video display. The information handlingsystem can also include one or more buses operable to transmitcommunications between the various hardware components.

FIG. 1 illustrates a block diagram of an exemplary embodiment of aninformation handling system, generally designated at 100. In one form,the information handling system 100 can be a computer system such as aserver. As shown in FIG. 1, the information handling system 100 caninclude a first physical processor 102 coupled to a first host bus 104and can further include additional processors generally designated asn^(th) physical processor 106 coupled to a second host bus 108. Thefirst physical processor 102 can be coupled to a chipset 110 via thefirst host bus 104. Further, the n^(th) physical processor 106 can becoupled to the chipset 110 via the second host bus 108. The chipset 110can support multiple processors and can allow for simultaneousprocessing of multiple processors and support the exchange ofinformation within information handling system 100 during multipleprocessing operations.

According to one aspect, the chipset 110 can be referred to as a memoryhub or a memory controller. For example, the chipset 110 can include anAccelerated Hub Architecture (AHA) that uses a dedicated bus to transferdata between first physical processor 102 and the n^(th) physicalprocessor 106. For example, the chipset 110, including an AHAenabled-chipset, can include a memory controller hub and an input/output(I/O) controller hub. As a memory controller hub, the chipset 110 canfunction to provide access to first physical processor 102 using firstbus 104 and n^(th) physical processor 106 using the second host bus 108.The chipset 110 can also provide a memory interface for accessing memory112 using a memory bus 114. In a particular embodiment, the buses 104,108, and 114 can be individual buses or part of the same bus. Thechipset 110 can also provide bus control and can handle transfersbetween the buses 104, 108, and 114.

According to another aspect, the chipset 110 can be generally consideredan application specific chipset that provides connectivity to variousbuses, and integrates other system functions. For example, the chipset110 can be provided using an Intel® Hub Architecture (IHA) chipset thatcan also include two parts, a Graphics and AGP Memory Controller Hub(GMCH) and an I/O Controller Hub (ICH). For example, an Intel 820E, an815E chipset, or any combination thereof, available from the IntelCorporation of Santa Clara, Calif., can provide at least a portion ofthe chipset 110. The chipset 110 can also be packaged as an applicationspecific integrated circuit (ASIC).

The information handling system 100 can also include a video graphicsinterface 122 that can be coupled to the chipset 110 using a third hostbus 124. In one form, the video graphics interface 122 can be anAccelerated Graphics Port (AGP) interface to display content within avideo display unit 126. Other graphics interfaces may also be used. Thevideo graphics interface 122 can provide a video display output 128 tothe video display unit 126. The video display unit 126 can include oneor more types of video displays such as a flat panel display (FPD) orother type of display device.

The information handling system 100 can also include an I/O interface130 that can be connected via an I/O bus 120 to the chipset 110. The I/Ointerface 130 and I/O bus 120 can include industry standard buses orproprietary buses and respective interfaces or controllers. For example,the I/O bus 120 can also include a Peripheral Component Interconnect(PCI) bus or a high speed PCI-Express bus. In one embodiment, a PCI buscan be operated at approximately 66 MHz and a PCI-Express bus can beoperated at approximately 128 Mhz. PCI buses and PCI-Express buses canbe provided to comply with industry standards for connecting andcommunicating between various PCI-enabled hardware devices. Other busescan also be provided in association with, or independent of, the I/O bus120 including, but not limited to, industry standard buses orproprietary buses, such as Industry Standard Architecture (ISA), SmallComputer Serial Interface (SCSI), Inter-Integrated Circuit (I²C), SystemPacket Interface (SPI), or Universal Serial buses (USBs).

In an alternate embodiment, the chipset 110 can be a chipset employing aNorthbridge/Southbridge chipset configuration (not illustrated). Forexample, a Northbridge portion of the chipset 110 can communicate withthe first physical processor 102 and can control interaction with thememory 112, the I/O bus 120 that can be operable as a PCI bus, andactivities for the video graphics interface 122. The Northbridge portioncan also communicate with the first physical processor 102 using firstbus 104 and the second bus 108 coupled to the n^(th) physical processor106. The chipset 110 can also include a Southbridge portion (notillustrated) of the chipset 110 and can handle I/O functions of thechipset 110. The Southbridge portion can manage the basic forms of I/Osuch as Universal Serial Bus (USB), serial I/O, audio outputs,Integrated Drive Electronics (IDE), and ISA I/O for the informationhandling system 100.

The information handling system 100 can further include a diskcontroller 132 coupled to the I/O bus 120, and connecting one or moreinternal disk drives such as a hard disk drive (HDD) 134 and an opticaldisk drive (ODD) 136 such as a Read/Write Compact Disk (R/W CD), aRead/Write Digital Video Disk (R/W DVD), a Read/Write mini-Digital VideoDisk (R/W mini-DVD), or other type of optical disk drive

FIG. 2 shows the information flow when an information handling system202 accesses frequently used information from a storage device 204.Storage device 204 can include a cache 206, a magnetic media 208, and adrive controller 210. Cache 206 can be a volatile memory such as dynamicrandom access memory (DRAM), a non-volatile memory such as non-volatilerandom access memory (NVRAM) like flash memory, or any combinationthereof. Cache 206 provides faster read or write speeds compared to themagnetic media, thereby providing a performance improvement when data isread from or written to cache 206 rather than magnetic media 208.

In general, cache 206 has a significantly smaller capacity than magneticmedia 208. Additionally, information stored in cache 206 may also bestored in the magnetic media. For example, changes to the informationstored in cache 206 may be written to magnetic media 208 and a portionof the information from magnetic media 208 may be read into cache 206.

When a portion of cache 206 is configured in a performance mode, suchthat frequently used data is stored in cache 206, frequently used datacan be read from magnetic media 208 to cache 206 as illustrated by arrow212. Information handling system 202 can access the frequently used datafrom cache 206 as illustrated by arrow 214. When changes are made to thefrequently used data, information handling system 202 can write the datato cache 206, as illustrated by arrow 216. The changes made to thefrequently used data can be propagated from the copy of the frequentlyused data that is stored in cache 206 to the copy of the frequently useddata that is stored in magnetic media 208, as illustrated by arrow 218.

The drive controller 210 can communicate with information handlingsystem 202 to provide a list of modes supported by storage device 204and the available capacity of cache 206. Additionally, the drivecontroller can configure portions of cache 206 to operate in aperformance mode, an archival mode, or a retrieval mode, as described inTable 1.

FIG. 3 shows the information flow when information handling system 202is performing a large write, such as when performing a backup, tostorage device 204. When performing a large write, a portion of cache206 can be configured for archival mode. The NVM portion of cache 206configured for archival mode can be maintained in a primarily emptystate. As information is written to storage device 204 from informationhandling system 202 the data can be written to the cache 206, asillustrated by arrow 220. The data can be copied or transferred fromcache 206 to magnetic media 208, as illustrated by arrow 222, and thespace in cache 206 can be released so that the space can be used forreceiving additional data from information handling system 202. Byplacing a portion of cache 206 in archival mode, information handlingsystem 202 can quickly write data to NVM cache 206 at higherperformance.

In various embodiments, drive controller 210 can auto detect a largewrite or series of continuous write commands, such as a backup ofanother storage device or storage of large files, such as media files.Upon detection, drive controller 210 can dynamically configure a portionof cache 206 for archival mode.

FIG. 4 shows the information flow and information handling system to goto his performing a large read series of continuous read commands, suchas when restoring from a backup, from storage device 204. Whenperforming a large read, a portion of cache 206 can be configured forretrieval mode. The portion of cache 206 configured for retrieval modecan be maintained in a substantially full state with data perfected frommagnetic media 208. Pre-fetched data can be transferred from magneticmedia 208 to cache 206, as illustrated by arrow 224. Informationhandling system 202 can retrieve the data from cache 206, as illustratedby arrow 226. By placing a portion of cache 206 in retrieval mode,information handling system 202 can quickly retrieve data from cache 206while minimizing the delay caused by reading from magnetic media 208 orwaiting for magnetic media to spin up for data retrieval.

In various embodiments, drive controller 210 can detect a large read orseries of large read, such as retrieval from a backup or accessing largefiles such as media files for playback. Upon detection, drive controller210 can dynamically configure a portion of cache 206 for retrieval mode.

FIG. 5 shows a method 500 for initializing and selecting features of astorage device, in accordance with various embodiments. At 502, thestorage device is connected to the information handling system, such asinformation handling system 100 and powered up. The storage device canbe an internal storage device that is part of information handlingsystem or an external storage device. The storage device can be poweredup when the information handling system is powered on, or the storagedevice can be powered up and attached to the information handling systemthat is already in operation.

At 504, the storage device can be initialized. In particularembodiments, a storage device control can be initialized and canestablish connectivity to the cache and to the magnetic media read/writeheads. Further, communication between the information handling systemand the storage device can be established.

At 506, it can be determined if the storage device supports adynamically optimizable cache. The storage device can support thedynamically optimizable cache when the cache policy of the cache can bechanged depending on an application currently utilizing the storagedevice.

When the storage device does not support a dynamically optimizablecache, such as when the storage device has a static cache policy, thestorage device can be initialized with a default or standard cachepolicy, such as a “most frequently used data” cache policy, asillustrated at 508.

Alternatively, at 510, when the storage device supports a dynamicallyoptimizable cache, the storage device can provide a list of supportedmodes and available cache capacity to the information handling system.For example, the storage device can indicate support for a performancemode, a backup archival mode, a backup retrieval mode, a mixed mode, orany combination thereof. Various modes are described in Table 1 below.

TABLE 1 Cache Cache Management Caching Policy Mode Benefit PolicyObjective Perfor- Improved Frequent, pinned Keep flash full, manceapplications data user data stored in maximize read access and cachecache hits out of response flash. Backup Improve large Most recent datain Keep flash empty, Archival write (such as, cache while lessmaximizing write Mode storing backup recent data cache hits into files)transfer continuously cache speed flushed to magnetic media BackupImprove large Preload read ahead Keep cache full with Retrieval read(such as data from magnetic magnetic media read Mode restoring mediainto cache ahead, maximizing backup files) read cache hits out out of ofcache. storage device Mixed Combination of Cache can be Combinations ofthe Mode Performance, partitioned to caching modes are Backup Archivalinclude more than selected. Mode, Backup one mode Retrieval Mode

At 512, the information handling system can select a storage devicecaching mode from the available caching modes provide by the storagedevice. At 514, the information handling system can set partition zonesizes of the cache. For example, when the storage device supports amixed mode cache, the information handling system can determine theamount of cache provided for each active mode. In this way, for example,a first portion of the cache can be configured for performance and asecond portion of the cache can be configured for backup archival mode.At 516, the storage device can apply the caching policy per requestedzone.

FIG. 6 shows a method 600 of writing to a storage device using a cachewith archival mode. At 602, the cache zone can be pre-erased. In variousembodiments, the memory in the cache zone may be marked as unused ratherthan erased. At 604, it can be determined if the storage device isreceiving writes to the archival zone from a host system. When thestorage device is not receiving writes within a set time, the storagedevice can spin down the magnetic media, as illustrated at 606.Alternatively, when the storage device is receiving writes, the cachecan accept the writes at high speed, as illustrated at 608, and thestorage device can spin up the magnetic media, as illustrated at 610. Byaccepting the writes at the cache, the host system can performadditional writes rather than waiting for the magnetic media to spin up.

At 612, the contents of the cache can be continuously flushed to themagnetic media. As the data is flushed to the magnetic media, theportion of the cache that has been written to the magnetic media can bemarked as free or erased in order to accept additional writes from thehost. At 614, the storage device can determine if the host has completedthe archival writes, such as when the host stops sending writes to thestorage device. When the writes from the host have not completed, thecache can continue to receive the writes, as illustrated at 608.Alternatively, when the storage device is no longer receiving archivalwrites from the host, the storage device can flush the contents of thearchival cache zone to the magnetic media, as illustrated at 616, andcan pre-erase the cache zone, as illustrated at 618. Once the archivalwrites have been transferred to the magnetic media, the storage devicecan spin down the magnetic media, as illustrated at 606 and go into idlemode as illustrated at 620.

FIG. 7 illustrates a method 700 of reading from a storage device using acache with retrieval mode. At 702, the cache zone can be preloaded withdata that is to be retrieved by the host. At 704, the storage device candetermine if reads from the retrieval zone have been received. Whenreads from the retrieval zone have not been received, the storage devicecan spin down the magnetic media, as illustrated at 707 and enter idlemode at 718.

Alternatively, when the storage device receives read requests from thehost for information, the storage device can spin up the magnetic media,as illustrated at 708. Additionally, the data can be provided to thehost from the cache, as illustrated at 710. Providing the data from thecache can allow the host to receive the data without having to wait forthe magnetic media to spin up. Additionally, as data is transferred tothe host, portions of the cache can be marked as free or can be erasedso the cache can accept additional data from the magnetic media. At 712,the magnetic media can perform a read ahead to keep the cache filledwith data that is likely to be requested by the host.

At 714, the storage device can determine if the host has completedreading the retrieval data. When the host has not completed reading thedata, the magnetic media can continue reading ahead to keep the cachefull, as illustrated at 712, and the cache can continue transferring thedata to the host, as illustrated at 710. Alternatively, when the hosthas completed reading the data, the next archival data can be saved tothe cache, as illustrated at 716, and the storage device can spin downthe magnetic media, as illustrated at 707.

Although only a few exemplary embodiments have been described in detailabove, those skilled in the art will readily appreciate that manymodifications are possible in the exemplary embodiments withoutmaterially departing from the novel teachings and advantages of theembodiments of the present disclosure. Accordingly, all suchmodifications are intended to be included within the scope of theembodiments of the present disclosure as defined in the followingclaims. In the claims, means-plus-function clauses are intended to coverthe structures described herein as performing the recited function andnot only structural equivalents, but also equivalent structures.

What is claimed is:
 1. A storage device comprising: a disk driveincluding: a magnetic media; a cache memory; and a drive controllerconfigured to: establish a portion of the cache memory as an archivalzone to improve large writes to the storage device; maximize availableempty space for writing data in the archival zone in accordance with anarchival cache policy; pre-erase the archival zone; direct write datafrom a host to an erased potion of the archival zone; and flush writedata from the archival zone to the magnetic media and erase the portionof the archival zone containing the write data, wherein the write datais not maintained in the cache memory for subsequent access.
 2. Thestorage device of claim 1, wherein the drive controller is furtherconfigured to: establish a portion of the cache memory as a retrievalzone to improve retrieval of large reads from the storage device;maximize read ahead data available in the retrieval zone in accordancewith a retrieval cache policy; pre-fetch read data from the magneticmedia to the retrieval zone; transfer read data from the retrieval zoneto a host upon request by the host, wherein the read data is notmaintained in the cache memory for subsequent access; and transfer readahead data to the retrieval zone to replace data transferred to thehost.
 3. The storage device of claim 1, wherein the cache includesnon-volatile random access memory (NVRAM).
 4. The storage device ofclaim 3, wherein the NVRAM is a solid state memory.
 5. The storagedevice of claim 1, wherein the cache includes dynamic random accessmemory (DRAM).
 6. The storage device of claim 1, wherein the drivecontroller is further configured to establish a portion of the cache asa performance zone in accordance with a most frequently used cachingpolicy.
 7. The storage device of claim 6, wherein the drive controlleris further configured to maintain the performance zone and the archivalzone.
 8. The storage device of claim 7, wherein the drive controller isfurther configured to maintain the performance zone, the archival zone,and a retrieval zone.
 9. The storage device of claim 1, wherein thedrive controller is further configured to dynamically switch betweenoperating a Portion of the cache memory a performance zone, an archivalzone, and a retrieval zone.
 10. The storage device of claim 9, whereinthe drive controller is further configured to cache memory is can beautomatically configured to operate as a performance zone, an archivalzone, and a retrieval zone.
 11. A storage device comprising: a diskdrive including: a magnetic media; a cache memory; and a drivecontroller configured to: establish a portion of the cache memory as aretrieval zone; maximize read ahead data available in the retrieval zonein accordance with a retrieval cache policy to improve retrieval oflarge reads from the storage device; pre-fetch read data from themagnetic media to the retrieval zone; transfer read data from theretrieval zone to a host upon request by the host, wherein the read datais not maintained in the cache memory for subsequent access; andtransfer read ahead data to the retrieval zone to replace datatransferred to the host.
 12. The storage device of claim 11, wherein thecache memory includes non-volatile random access memory (NVRAM).
 13. Thestorage device of claim 12, wherein the NVRAM is a solid state memory.14. The storage device of claim 11, wherein a portion of the cachememory is a performance zone having a most frequently used cachingpolicy.
 15. The storage device of claim 11, wherein the drive controlleris configured to partition the cache memory into a performance zone andthe retrieval zone.
 16. The storage device of claim 11, wherein thedrive controller is configured to dynamically configured the cachememory as a performance zone and the retrieval zone.
 17. An informationhandling system comprising: a system storage; a processor; and a storagedevice comprising: a disk drive including: magnetic media; a cachememory; and a drive controller configured to: establish a portion of thecache memory as an archival zone; maximize available empty space in thearchival zone for writing data from the processor in accordance with anarchival cache policy to improve large writes to the storage device;pre-erase the archival zone; direct write data from the processor to anerased portion of the archival zone; and flush write data from thearchival zone to the magnetic media and erase the portion of thearchival zone containing the write data, wherein the write data is notmaintained in the cache memory for subsequent access; wherein theprocessor is configured to communicate with the drive controller to:determine support for an archival mode; instruct the drive controller toutilize the archival mode; and write data from the system storage to thecache memory.
 18. The information handling system of claim 17, wherein:the processor is further configured to communicate with the drivecontroller to: determine support for a retrieval mode, instruct thedrive controller to utilize the retrieval mode; read data from the cachememory to the system storage; and the drive controller is furtherconfigured to: establish a portion of the cache memory as a retrievalzone; maximize read ahead data in the retrieval zone in accordance witha retrieval cache policy to improve retrieval of large reads from thestorage device; pre-fetch read data from the magnetic media to theretrieval zone; transfer read data from the retrieval zone to a hostupon request by the host, wherein the read data is not maintained in thecache memory for subsequent access; and transfer read ahead data to theretrieval zone to replace data transferred to the host.
 19. Theinformation handling system of claim 17, wherein the drive controller isfurther configured to establish a portion of the cache memory as aperformance zone in accordance with a most frequently used cachingpolicy.
 20. The information handling system of claim 17, wherein asystem storage includes a hard disk drive.